﻿<%@ Page Title="终端管理" Language="C#" MasterPageFile="~/POS/POS.Master" AutoEventWireup="true" CodeBehind="Terminals.aspx.cs" Inherits="Me.Amon.POS.Terminals" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            height: 24px;
        }
        .style2
        {
            width: 411px;
        }
        .style3
        {
            height: 24px;
            width: 411px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="text-align: right">
        <asp:Button ID="BnAppendTerminal" runat="server" Text="添加终端" OnClick="BnAppendTerminal_Click" />
        <asp:HiddenField ID="HfPage" runat="server" Value="0" />
    </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td style="width: 200px" valign="top" align="left">
                        <asp:ListBox ID="LbCompany" runat="server" Width="190px" Height="200px" OnSelectedIndexChanged="LbCompany_SelectedIndexChanged" AutoPostBack="true"></asp:ListBox>
                    </td>
                    <td align="center" valign="top">
                        <table border="0" cellpadding="4" cellspacing="0" class="data_list" width="720">
                            <tr class="data_head">
                                <th style="width: 80px;">
                                    终端代码
                                </th>
                                <th>
                                    终端名称
                                </th>
                                <th>
                                    终端所属门店
                                </th>
                                <th>
                                    终端地址
                                </th>
                                <th>
                                    使用状态
                                </th>
                            </tr>
                            <asp:Repeater ID="RpShops" runat="server">
                                <ItemTemplate>
                                    <tr class="data_rowd">
                                        <td>
                                            <a href="UpdateTerminal.aspx?corp=<%# Eval(Me.Amon.Da.Db.POS.DTerminal.CORP_ID) %>&shop=<%# Eval(Me.Amon.Da.Db.POS.DTerminal.SHOP_ID) %>&pos=<%# Eval(Me.Amon.Da.Db.POS.DTerminal.ID) %>" title="点击查看详情">
                                                <%# Eval(Me.Amon.Da.Db.POS.DTerminal.CODE)%>
                                            </a>
                                        </td>
                                        <td>
                                            <%# Eval(Me.Amon.Da.Db.POS.DTerminal.NAME)%>
                                        </td>
                                        <td>
                                            <%# Eval("shop_name")%>
                                        </td>
                                        <td>
                                            <%# Eval(Me.Amon.Da.Db.POS.DTerminal.ADDR)%>
                                        </td>
                                        <td>
                                            <%# Me.Amon.POS.MPos.GetStatusName(Eval(Me.Amon.Da.Db.POS.DTerminal.STATUS))%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <AlternatingItemTemplate>
                                    <tr class="data_rowd">
                                        <td>
                                            <a href="UpdateTerminal.aspx?corp=<%# Eval(Me.Amon.Da.Db.POS.DTerminal.CORP_ID) %>&shop=<%# Eval(Me.Amon.Da.Db.POS.DTerminal.SHOP_ID) %>&pos=<%# Eval(Me.Amon.Da.Db.POS.DTerminal.ID) %>" title="点击查看详情">
                                                <%# Eval(Me.Amon.Da.Db.POS.DTerminal.CODE)%>
                                            </a>
                                        </td>
                                        <td>
                                            <%# Eval(Me.Amon.Da.Db.POS.DTerminal.NAME)%>
                                        </td>
                                        <td>
                                            <%# Eval("shop_name")%>
                                        </td>
                                        <td>
                                            <%# Eval(Me.Amon.Da.Db.POS.DTerminal.ADDR)%>
                                        </td>
                                        <td>
                                            <%# Me.Amon.POS.MPos.GetStatusName(Eval(Me.Amon.Da.Db.POS.DTerminal.STATUS))%>
                                        </td>
                                    </tr>
                                </AlternatingItemTemplate>
                            </asp:Repeater>
                            <tr>
                                <td colspan="7" align="right">
                                    <asp:LinkButton ID="HlHome" runat="server" OnClick="HlHome_Click">首页</asp:LinkButton>
                                    <asp:Label ID="LlPrev" runat="server">...</asp:Label>
                                    <asp:LinkButton ID="HlPage1" runat="server" OnClick="HlPage1_Click">1</asp:LinkButton>
                                    <asp:LinkButton ID="HlPage2" runat="server" OnClick="HlPage2_Click">2</asp:LinkButton>
                                    <asp:LinkButton ID="HlPage3" runat="server" OnClick="HlPage3_Click">3</asp:LinkButton>
                                    <asp:Label ID="LlNext" runat="server">...</asp:Label>
                                    <asp:LinkButton ID="HlLast" runat="server" OnClick="HlLast_Click">尾页</asp:LinkButton>
                                    <asp:Label ID="LlPage" runat="server">0</asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
